Optimal. Leaf size=322 \[ \frac {b (a d (1+m)-b c (1+m+n)) (A d (1+m)-B c (1+m+2 n)) (e x)^{1+m}}{2 c^2 d^3 e (1+m) n^2}-\frac {(B c-A d) (e x)^{1+m} \left (a+b x^n\right )^2}{2 c d e n \left (c+d x^n\right )^2}-\frac {(b c-a d) (e x)^{1+m} \left (a (B c (1+m)-A d (1+m-2 n))-b (A d (1+m)-B c (1+m+2 n)) x^n\right )}{2 c^2 d^2 e n^2 \left (c+d x^n\right )}+\frac {(a d (B c (1+m)-A d (1+m-2 n)) (b c (1+m)-a d (1+m-n))-b c (a d (1+m)-b c (1+m+n)) (A d (1+m)-B c (1+m+2 n))) (e x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )}{2 c^3 d^3 e (1+m) n^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.37, antiderivative size = 322, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {608, 470, 371}
\begin {gather*} \frac {(e x)^{m+1} \, _2F_1\left (1,\frac {m+1}{n};\frac {m+n+1}{n};-\frac {d x^n}{c}\right ) (a d (b c (m+1)-a d (m-n+1)) (B c (m+1)-A d (m-2 n+1))-b c (a d (m+1)-b c (m+n+1)) (A d (m+1)-B c (m+2 n+1)))}{2 c^3 d^3 e (m+1) n^2}+\frac {b (e x)^{m+1} (a d (m+1)-b c (m+n+1)) (A d (m+1)-B c (m+2 n+1))}{2 c^2 d^3 e (m+1) n^2}-\frac {(e x)^{m+1} (b c-a d) \left (a (B c (m+1)-A d (m-2 n+1))-b x^n (A d (m+1)-B c (m+2 n+1))\right )}{2 c^2 d^2 e n^2 \left (c+d x^n\right )}-\frac {(e x)^{m+1} \left (a+b x^n\right )^2 (B c-A d)}{2 c d e n \left (c+d x^n\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 470
Rule 608
Rubi steps
\begin {align*} \int \frac {(e x)^m \left (a+b x^n\right )^2 \left (A+B x^n\right )}{\left (c+d x^n\right )^3} \, dx &=-\frac {(B c-A d) (e x)^{1+m} \left (a+b x^n\right )^2}{2 c d e n \left (c+d x^n\right )^2}-\frac {\int \frac {(e x)^m \left (a+b x^n\right ) \left (-a (B c (1+m)-A d (1+m-2 n))+b (A d (1+m)-B c (1+m+2 n)) x^n\right )}{\left (c+d x^n\right )^2} \, dx}{2 c d n}\\ &=-\frac {(B c-A d) (e x)^{1+m} \left (a+b x^n\right )^2}{2 c d e n \left (c+d x^n\right )^2}-\frac {(b c-a d) (e x)^{1+m} \left (a (B c (1+m)-A d (1+m-2 n))-b (A d (1+m)-B c (1+m+2 n)) x^n\right )}{2 c^2 d^2 e n^2 \left (c+d x^n\right )}+\frac {\int \frac {(e x)^m \left (a (B c (1+m)-A d (1+m-2 n)) (b c (1+m)-a d (1+m-n))+b (a d (1+m)-b c (1+m+n)) (A d (1+m)-B c (1+m+2 n)) x^n\right )}{c+d x^n} \, dx}{2 c^2 d^2 n^2}\\ &=\frac {b (a d (1+m)-b c (1+m+n)) (A d (1+m)-B c (1+m+2 n)) (e x)^{1+m}}{2 c^2 d^3 e (1+m) n^2}-\frac {(B c-A d) (e x)^{1+m} \left (a+b x^n\right )^2}{2 c d e n \left (c+d x^n\right )^2}-\frac {(b c-a d) (e x)^{1+m} \left (a (B c (1+m)-A d (1+m-2 n))-b (A d (1+m)-B c (1+m+2 n)) x^n\right )}{2 c^2 d^2 e n^2 \left (c+d x^n\right )}+\frac {\left (a (B c (1+m)-A d (1+m-2 n)) (b c (1+m)-a d (1+m-n))-\frac {b c (a d (1+m)-b c (1+m+n)) (A d (1+m)-B c (1+m+2 n))}{d}\right ) \int \frac {(e x)^m}{c+d x^n} \, dx}{2 c^2 d^2 n^2}\\ &=\frac {b (a d (1+m)-b c (1+m+n)) (A d (1+m)-B c (1+m+2 n)) (e x)^{1+m}}{2 c^2 d^3 e (1+m) n^2}-\frac {(B c-A d) (e x)^{1+m} \left (a+b x^n\right )^2}{2 c d e n \left (c+d x^n\right )^2}-\frac {(b c-a d) (e x)^{1+m} \left (a (B c (1+m)-A d (1+m-2 n))-b (A d (1+m)-B c (1+m+2 n)) x^n\right )}{2 c^2 d^2 e n^2 \left (c+d x^n\right )}+\frac {\left (a (B c (1+m)-A d (1+m-2 n)) (b c (1+m)-a d (1+m-n))-\frac {b c (a d (1+m)-b c (1+m+n)) (A d (1+m)-B c (1+m+2 n))}{d}\right ) (e x)^{1+m} \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )}{2 c^3 d^2 e (1+m) n^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(1924\) vs. \(2(322)=644\).
time = 1.14, size = 1924, normalized size = 5.98 \begin {gather*} \frac {x (e x)^m \left (-b^2 B c^5 (1+m) n+A b^2 c^4 d (1+m) n+2 a b B c^4 d (1+m) n-2 a A b c^3 d^2 (1+m) n-a^2 B c^3 d^2 (1+m) n+a^2 A c^2 d^3 (1+m) n+b^2 B c^4 (1+m) \left (c+d x^n\right )-A b^2 c^3 d (1+m) \left (c+d x^n\right )-2 a b B c^3 d (1+m) \left (c+d x^n\right )+2 a A b c^2 d^2 (1+m) \left (c+d x^n\right )+a^2 B c^2 d^2 (1+m) \left (c+d x^n\right )-a^2 A c d^3 (1+m) \left (c+d x^n\right )+b^2 B c^4 m (1+m) \left (c+d x^n\right )-A b^2 c^3 d m (1+m) \left (c+d x^n\right )-2 a b B c^3 d m (1+m) \left (c+d x^n\right )+2 a A b c^2 d^2 m (1+m) \left (c+d x^n\right )+a^2 B c^2 d^2 m (1+m) \left (c+d x^n\right )-a^2 A c d^3 m (1+m) \left (c+d x^n\right )+4 b^2 B c^4 (1+m) n \left (c+d x^n\right )-2 A b^2 c^3 d (1+m) n \left (c+d x^n\right )-4 a b B c^3 d (1+m) n \left (c+d x^n\right )+2 a^2 A c d^3 (1+m) n \left (c+d x^n\right )+2 b^2 B c^3 n^2 \left (c+d x^n\right )^2-b^2 B c^3 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+A b^2 c^2 d \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a b B c^2 d \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-2 a A b c d^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-a^2 B c d^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+a^2 A d^3 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-2 b^2 B c^3 m \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 A b^2 c^2 d m \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+4 a b B c^2 d m \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-4 a A b c d^2 m \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-2 a^2 B c d^2 m \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a^2 A d^3 m \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-b^2 B c^3 m^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+A b^2 c^2 d m^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a b B c^2 d m^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-2 a A b c d^2 m^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-a^2 B c d^2 m^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+a^2 A d^3 m^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-3 b^2 B c^3 n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+A b^2 c^2 d n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a b B c^2 d n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a A b c d^2 n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+a^2 B c d^2 n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-3 a^2 A d^3 n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-3 b^2 B c^3 m n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+A b^2 c^2 d m n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a b B c^2 d m n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a A b c d^2 m n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+a^2 B c d^2 m n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-3 a^2 A d^3 m n \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )-2 b^2 B c^3 n^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )+2 a^2 A d^3 n^2 \left (c+d x^n\right )^2 \, _2F_1\left (1,\frac {1+m}{n};\frac {1+m+n}{n};-\frac {d x^n}{c}\right )\right )}{2 c^3 d^3 (1+m) n^2 \left (c+d x^n\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.08, size = 0, normalized size = 0.00 \[\int \frac {\left (e x \right )^{m} \left (a +b \,x^{n}\right )^{2} \left (A +B \,x^{n}\right )}{\left (c +d \,x^{n}\right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (e\,x\right )}^m\,\left (A+B\,x^n\right )\,{\left (a+b\,x^n\right )}^2}{{\left (c+d\,x^n\right )}^3} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________